{include file="public/header" /}
</head>
<body>
<form class="layui-form layui-form-pane" action="" style="padding: 20px;">
    <input type="hidden" name="config_id" value="{$dataInfo.config_id|default=0}">
    <input type="hidden" name="config_type" value="{$dataInfo.config_type|default=''}">
    <div class="layui-form-item">
        <label class="layui-form-label">配置值</label>
        <div class="layui-input-block">
            <input type="text" name="config_name" required lay-verify="required"   placeholder="请输入配置值" autocomplete="off" class="layui-input" value="{$dataInfo.config_name|default=''}">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" type="button" lay-submit lay-filter="formDemo">立即提交</button>
        </div>
    </div>
</form>
</body>
<script>
    layui.use('form', function(){
        var form = layui.form;
        form.render();
        //监听提交
        form.on('submit(formDemo)', function(data){
            post_sub("{:url('Configs/configAdd')}",data.field);
            return false;
        });
    });
</script>
</html>